#include "SceneObject.h"

namespace Display
{
	SceneObject::SceneObject(void)
	{
		SetPosition(0,0,0);
		SetScale(1,1,1);
		SetRotation(1,1,1);
	}


	SceneObject::~SceneObject( void )
	{

	}

	void SceneObject::SetPosition( XMFLOAT3 pos )
	{
		position = pos;
	}

	void SceneObject::SetPosition( float x,float y,float z )
	{
		SetX(x);
		SetY(y);
		SetZ(z);
	}

	void SceneObject::SetX( float x )
	{
		position.x = x;
	}

	void SceneObject::SetY( float y )
	{
		position.y = y;
	}

	void SceneObject::SetZ( float z )
	{
		position.z = z;
	}

	DirectX::XMFLOAT3 SceneObject::GetPosition()
	{
		return position;
	}

	float SceneObject::GetX()
	{
		return position.x;
	}

	float SceneObject::GetY()
	{
		return position.y;
	}

	float SceneObject::GetZ()
	{
		return position.z;

	}

	void SceneObject::Translate( float offsetX,float offsetY,float offsetZ )
	{
		XMFLOAT3 newPos(GetX() + offsetX,GetY() + offsetY,GetZ() + offsetZ);
		SetPosition(newPos);
	}

	void SceneObject::Rotate( float offsetX,float offsetY,float offsetZ )
	{
		XMFLOAT3 newRot(GetRotationX() + offsetX,GetRotationY() + offsetY , GetRotationZ() + offsetZ);
		SetRotation(newRot);
	}

	void SceneObject::SetRotation( XMFLOAT3 rotation )
	{
		this->rotation = rotation;
	}

	void SceneObject::SetRotation( float x,float y,float z )
	{
		SetRotationX(x);
		SetRotationY(y);
		SetRotationZ(z);
	}

	void SceneObject::SetRotationX( float x )
	{
		rotation.x = x;
	}

	void SceneObject::SetRotationY( float y )
	{
		rotation.y = y;
	}

	void SceneObject::SetRotationZ( float z )
	{
		rotation.z = z;
	}

	DirectX::XMFLOAT3 SceneObject::GetRotation()
	{
		return rotation;
	}

	float SceneObject::GetRotationX()
	{
		return rotation.x;
	}

	float SceneObject::GetRotationY()
	{
		return rotation.y;
	}

	float SceneObject::GetRotationZ()
	{
		return rotation.z;
	}

	DirectX::XMFLOAT3 SceneObject::GetScale()
	{
		return scale;

	}

	float SceneObject::GetScaleX()
	{
		return scale.x;
	}

	float SceneObject::GetScaleY()
	{
		return scale.y;
	}

	float SceneObject::GetScaleZ()
	{
		return scale.z;
	}

	void SceneObject::SetScale( XMFLOAT3 scale )
	{
		this->scale = scale;
	}

	void SceneObject::SetScale( float x,float y,float z )
	{
		SetScaleX(x);
		SetScaleY(y);
		SetScaleZ(z);
	}

	void SceneObject::SetScaleX( float x )
	{
		scale.x = x;
	}

	void SceneObject::SetScaleY( float y )
	{
		scale.y = y;
	}

	void SceneObject::SetScaleZ( float z )
	{
		scale.z = z;
	}

}